package co.yixiang.modules.system.domain;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;

import lombok.Data;
import lombok.experimental.Accessors;
import lombok.Builder;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import org.hibernate.annotations.CreationTimestamp;

import java.time.LocalDateTime;
import java.io.Serializable;

/**
 * @author zf
 * @date 2021-07-10
 */
@Data
@Accessors(chain = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("guidance_price")

public class GuidancePrice implements Serializable {

    @TableId

    private Integer id;

    /**
     * 行政区
     */

    private String district;

    /**
     * 街道
     */

    private String street;

    /**
     * 项目
     */

    private String project;

    /**
     * 项目成交价
     */

    private Integer money;


    /**
     * 创建时间
     */
    @CreationTimestamp
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    public void copy(GuidancePrice source) {
        BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true));
    }
}
